home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIBookmarksService.idl < prev    next >
Text File  |  2006-05-08  |  6KB  |  132 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Ben Goodger              <ben@netscape.com>
  24.  *   David Hyatt              <hyatt@mozilla.org>
  25.  *   Vladimir Vukicevic       <vladimir@pobox.com>
  26.  *
  27.  * Alternatively, the contents of this file may be used under the terms of
  28.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  29.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  30.  * in which case the provisions of the GPL or the LGPL are applicable instead
  31.  * of those above. If you wish to allow use of your version of this file only
  32.  * under the terms of either the GPL or the LGPL, and not to allow others to
  33.  * use your version of this file under the terms of the MPL, indicate your
  34.  * decision by deleting the provisions above and replace them with the notice
  35.  * and other provisions required by the GPL or the LGPL. If you do not delete
  36.  * the provisions above, a recipient may use your version of this file under
  37.  * the terms of any one of the MPL, the GPL or the LGPL.
  38.  *
  39.  * ***** END LICENSE BLOCK ***** */
  40.  
  41. /**
  42.  * The Browser Bookmarks service
  43.  */
  44.  
  45. #include "nsISupports.idl"
  46.  
  47. interface nsIArray;
  48. interface nsIRDFResource;
  49. interface nsITransactionManager;
  50.  
  51. [scriptable, uuid(ccc48346-429d-4931-94dc-beb1afcea292)]
  52. interface nsIBookmarksService : nsISupports
  53. {
  54.     const unsigned long BOOKMARK_DEFAULT_TYPE   = 0;
  55.     const unsigned long BOOKMARK_SEARCH_TYPE    = 1;
  56.     const unsigned long BOOKMARK_FIND_TYPE      = 2;
  57.  
  58.     boolean readBookmarks();
  59.     boolean isBookmarkedResource(in nsIRDFResource aSource);
  60.  
  61.     nsIRDFResource createFolder(in wstring aName);
  62.     nsIRDFResource createFolderInContainer(in wstring aName, in nsIRDFResource aParentFolder, 
  63.                                            in long aIndex);
  64.  
  65.     nsIRDFResource createBookmark(in wstring aName,
  66.                                   in wstring aURL,
  67.                                   in wstring aShortcutURL,
  68.                                   in wstring aDescription,
  69.                                   in wstring aDocCharSet,
  70.                                   in wstring aPostData);
  71.     nsIRDFResource createBookmarkInContainer(in wstring aName,
  72.                                              in wstring aURL,
  73.                                              in wstring aShortcutURL,
  74.                                              in wstring aDescription,
  75.                                              in wstring aDocCharSet,
  76.                                              in wstring aPostData,
  77.                                              in nsIRDFResource aFolder,
  78.                                              in long aIndex);
  79.  
  80.     nsIRDFResource createLivemark(in wstring aName,
  81.                                   in wstring aURL,
  82.                                   in wstring aRSSURL,
  83.                                   in wstring aDescription);
  84.     nsIRDFResource createLivemarkInContainer(in wstring aName,
  85.                                              in wstring aURL,
  86.                                              in wstring aRSSURL,
  87.                                              in wstring aDescription,
  88.                                              in nsIRDFResource aFolder,
  89.                                              in long aIndex);
  90.  
  91.     nsIRDFResource createSeparator();
  92.  
  93.     nsIRDFResource cloneResource(in nsIRDFResource aSource);
  94.     nsIRDFResource getParent(in nsIRDFResource aSource);
  95.     nsIArray getParentChain(in nsIRDFResource aSource);
  96.  
  97.     nsIRDFResource getBookmarksToolbarFolder();
  98.     void setBookmarksToolbarFolder(in nsIRDFResource aSource);
  99.  
  100.     void updateBookmarkIcon(in string aURL, in string aIconMIMEtype,
  101.                             [const,array,size_is(aIconDataLen)] in octet aIconData,
  102.                             in unsigned long aIconDataLen);
  103.     void removeBookmarkIcon(in string aURL);
  104.  
  105.     void updateLastVisitedDate(in string aURL, in wstring docCharset);
  106.  
  107.     AString getLastCharset(in AUTF8String aURL); 
  108.     
  109.     string resolveKeyword(in wstring aName, out wstring aPostData);
  110.  
  111.     readonly attribute nsITransactionManager transactionManager;
  112.  
  113.     //XXXpch: to be removed.
  114.     void addBookmarkImmediately(in wstring aURI, in wstring aTitle, in long bmType, in wstring docCharset);
  115.     boolean isBookmarked(in string aURL);
  116.  
  117. };
  118.  
  119. %{C++
  120.  
  121. // {E638D760-8687-11d2-B530-000000000000}
  122. #define NS_BOOKMARKS_SERVICE_CID \
  123. { 0xe638d760, 0x8687, 0x11d2, { 0xb5, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } }
  124.  
  125. #define NS_BOOKMARKS_SERVICE_CONTRACTID \
  126.     "@mozilla.org/browser/bookmarks-service;1"
  127.  
  128. #define NS_BOOKMARKS_DATASOURCE_CONTRACTID \
  129.     "@mozilla.org/rdf/datasource;1?name=bookmarks"
  130.  
  131. %}
  132.